package pl.edu.agh.intobl;

import org.joone.engine.Monitor;
import org.joone.engine.NeuralNetEvent;
import org.joone.engine.NeuralNetListener;

public class NetworkListener implements NeuralNetListener {

	public void cicleTerminated(NeuralNetEvent event) {
		Monitor monitor = (Monitor)event.getSource();
		long currentCicle = monitor.getCurrentCicle();
		/* We want print the results every 100 epochs */
		if (currentCicle % 100 == 0)
		System.out.println(currentCicle + " epochs remaining - RMSE = " +
		monitor.getGlobalError());

	}

	public void errorChanged(NeuralNetEvent arg0) {
		// TODO Auto-generated method stub

	}

	public void netStarted(NeuralNetEvent arg0) {
		// TODO Auto-generated method stub

	}

	public void netStopped(NeuralNetEvent event) {
		System.out.println("Training finished");
	}

	public void netStoppedError(NeuralNetEvent arg0, String arg1) {
		// TODO Auto-generated method stub

	}

}
